package com.ss.android.article.base.feature.model;

import android.content.Context;

import com.ss.android.common.ad.MobAdClickCombiner;

import org.json.JSONObject;

public class FeedCallAppAd extends AppAd {
    public int actionType;
    public String phoneNumber;
    public String btnText;

    public FeedCallAppAd(int arg1) {
        super(arg1);
    }

    public final boolean isValid() {
        if (this.id > 0 && this.adType == 3) {
            return true;
        } else {
            return false;
        }
    }

    public final void a(Context context, String arg12) {
        if (context != null && !android.support.design.a.isTextEmpty(arg12) && this.actionType == 1) {
            try {
                JSONObject jo = new JSONObject();
                jo.put("log_extra", this.logExtra);
                MobAdClickCombiner.onAdEvent(context, "feed_call", arg12, this.id, ((long) this.actionType), jo, 2);
            } catch (Exception v0) {
            }
        }
    }

    public void initWithJO(JSONObject jo) {
        super.initWithJO(jo);
        if (jo != null) {
            try {
                this.actionType = jo.optInt("action_type");
                this.phoneNumber = jo.optString("phone_number");
                this.btnText = jo.optString("btn_text");
                jo.optString("alert_text");
            } catch (Exception e) {
            }

        }
    }
}

